package com.park.web.job;

import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.park.client.model.user.UserModel;
import com.park.client.service.user.UserService;

@DisallowConcurrentExecution
public class HelloWorldJob implements Job{

	private static final Logger log = LoggerFactory.getLogger(HelloWorldJob.class);
	@Autowired
	private UserService userService;
	
	@Override
	public void execute(JobExecutionContext context) throws JobExecutionException {
		try {
			System.out.println("======");
			UserModel user = userService.login("admin");
			System.out.println("======"+user.getPassword());
		} catch (Exception e) {
			log.error(e.getMessage());
		}
		
	}

}
